Arrays.sort() vs Collections.sort()


Posted by Rich on 2022-08-10

差別是:

  1. Collections 是給 List 用的,Arrays 是給 array 用的。
  2. Collections 用 binary sort, Arrays 用 merge sort

連結










Related Posts

CSS 預處理

CSS 預處理

同步 & 非同步(5) - Promise.all 與 並行

同步 & 非同步(5) - Promise.all 與 並行

[Week 2] JavaScript - 變數、陣列、物件、== 與 ===

[Week 2] JavaScript - 變數、陣列、物件、== 與 ===


Comments